<div class="container">
    <div class="row">
        <div class="span10 offset1 well">
            <?php echo $this->partial('userlist/userlist.phtml', $this->userList); ?>
            <div class="span5 well color2">
                <p>
                <?php if(is_array($this->messages)) : ?>
                    <div class="alert alert-error">
                        <ul>
                            <?php foreach($this->messages as $fieldname => $errorTyp) : ?>
                                <?php foreach($errorTyp as $typ => $messages) : ?>
                                    <li><?php echo $messages; ?></li>
                                <?php endforeach; ?>
                            <?php endforeach; ?>
                        </ul>
                    </div>
                <?php endif; ?>
                </p>
                <form method="post">
                <table class="table table-condensed">
                    <tbody>
                        <tr>
                            <td class="tableLabel">Role</td>
                            <td>
                                <div class="controls">
                                    <select id="rolelist" class="input-large" name="form[role]">
                                        <?php foreach ($this->roleList as $id => $role) : ?>
                                        <option value="<?php echo $id; ?>" <?php echo ($this->role == $role) ? 'selected' : ''; ?>>
                                            <?php echo $role; ?>
                                        </option>
                                        <?php endforeach; ?>
                                    </select>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>Benutzername</td>
                            <td>
                                <div class="control-group <?php echo $this->usernameError; ?>">
                                    <input type="text" class="input-large" id="username" name="form[username]" value="<?php echo $this->username; ?>">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>Vorname</td>
                            <td>
                                <div class="control-group <?php echo $this->firstnameError; ?>">
                                    <input type="text" class="input-large" id="firstname" name="form[firstname]" value="<?php echo $this->firstname; ?>">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>Nachname</td>
                            <td>
                                <div class="control-group <?php echo $this->lastnameError; ?>">
                                    <input type="text" class="input-large" id="lastname" name="form[lastname]" value="<?php echo $this->lastname; ?>">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>Passwort</td>
                            <td>
                                <div class="control-group <?php echo $this->passwordError; ?>">
                                    <input type="password" class="input-large" id="password" name="form[password]" value="<?php echo $this->password; ?>">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>Passwort wiederholen</td>
                            <td>
                                <div class="control-group <?php echo $this->repeatError; ?>">
                                    <input type="password" class="input-large" id="repeat" name="form[repeat]" value="<?php echo $this->repeat; ?>">
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="control-group">
                    <button type="submit" class="btn btn-primary">Änderung speichern</button>
                    <a class="btn" href="<?php echo $this->url(array('do' => null, 'userid' => $this->userId)); ?>">abbrechen</a>
                </div>
                </form>
            </div>
        </div>
    </div>
</div>